Deduplicate walltime perf symbols, unwind data and debug info across pids#240
Conversation
99e0ea4 to
1a32faa
Compare
15316f4 to
9305a03
Compare
a3617af to
7f65690
Compare
not-matthias
left a comment
There was a problem hiding this comment.
I think the struct naming can be clarified a bit, I was struggling quite a lot to understand how they map together. Maybe also using custom types for the key that's used in the hashmaps.
The overall logic looks good! Next round should be quick
...apshots/codspeed_runner__executor__wall_time__perf__unwind_data__tests__cpp_unwind_data.snap
Outdated
Show resolved
Hide resolved
192d2ce to
14cb24f
Compare
14cb24f to
9a7f9bc
Compare
not-matthias
left a comment
There was a problem hiding this comment.
LGTM overall. Just a few minor stylistic comments.
e43f420 to
f308463
Compare
31d5b35 to
642e4fd
Compare
This fixes a regression introduced in 8b37208. We now filter pids using `bench_pids`, except for `exec-harness` integrations, where we take all pids.
- Store pid-agnostic data in a file or json map under a mapped `path_key` for each elf - For each pid, store pid specific data, mostly the computed load_bias from where each module was loaded into memory at runtime, alongside a key to retrieve the pid-agnostic data This way, we only write to disk relevant parts of the information.
Also add a rebuild trigger to make it easier to run GITHUB_ACTIONS=1 cargo test` locally. We could have a better trigger, but this will do for now.
642e4fd to
82a55b9
Compare
54f94be to
5bb49e6
Compare
art049
left a comment
There was a problem hiding this comment.
Just the naming thing TBD
Otherwise, lgtm! this needs extensive testing before release though
| /// Register a path in the map if absent, assigning a new unique key. | ||
| /// Returns the assigned key. | ||
| fn get_or_insert_key(path_to_key: &mut HashMap<PathBuf, String>, path: &Path) -> String { | ||
| if let Some(key) = path_to_key.get(path) { | ||
| return key.clone(); | ||
| } | ||
| let key = naming::indexed_semantic_key(path_to_key.len(), path); | ||
| path_to_key.insert(path.to_owned(), key.clone()); | ||
| key | ||
| } |
There was a problem hiding this comment.
I think we loose a bit of info here. IIRC, we ended up saying that hashing the path was a better option no?
I know we iterated quite a lot but here we loose all info about similar prefixes (when in the same path) even if it doesn't happen often
Merge/deployment
Content
Since the real deduplicator source of truth is actually the path of the elf file on disk, I settled on
it allows for the filename to be determined by the actual path, without having to either nest all the files, or have to sanitize paths to file name and end up in awkward file-name length limitations
Here's what it looks like on a 1000 iterations report of one simple program